package com.example.leetcode.tree;

import com.example.leetcode.tree.common.TreeNode;
import com.example.leetcode.tree.common.TreeUtils;

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 * int val;
 * TreeNode left;
 * TreeNode right;
 * TreeNode() {}
 * TreeNode(int val) { this.val = val; }
 * TreeNode(int val, TreeNode left, TreeNode right) {
 * this.val = val;
 * this.left = left;
 * this.right = right;
 * }
 * }
 */
class Solution2331 {
    public boolean evaluateTree(TreeNode root) {
        return TreeUtils.evaluateTree(root);
    }
}

public class leetcode2331 {
    public static void main(String[] args) {
        Solution2331 solution2331 = new Solution2331();
        Integer[] root = {2, 1, 3, null, null, 0, 1};
        System.out.println(solution2331.evaluateTree(TreeUtils.generateLeetcodeTree(root)));
    }
}
